Dynomotion

Group: DynoMotion Message: 8570 From: sahil_atlury Date: 11/4/2013
Subject: Re: Reg: Homing - Y-Axis doesnt "Home" properly, stops inb

Dear Tom,


The original code was (for Y axis) was below. We had only introduced the statements namely, EnableAxisDest(1,-95611.2); and Move(1,-94611.2); to see if we could solve the issue. However in both the same Y-axis never homed properly. However like you said we will try out setting soft limits to infinite at initialization, and after homing set it to desired value and report back.


We do have one more problem. If we introduce any kind of loop say for loop in the initialization program, it causes the window to become unresponsive. (kmotioncnc)


The OS is windows 7 32-bit (with uac disabled and running as admin).


 // Home Y next - jog until it sees the limit


    Jog(1,-600);              // jog slowly negative
    while (ReadBit(181)) ;      // loop until IO bit goes high
    Jog(1,0);                // stop
    while (!CheckDone(1)) ; // loop until motion completes 
    DisableAxis(1);            // disable the axis
    Zero(1);                // Zero the position
    EnableAxis(1);            // re-enable the ServoTick
    Move(1,1000.0);            // move some amount inside the limits
    while (!CheckDone(1)) ; // loop until motion completes 
    ch1->LimitSwitchOptions = SaveYLimits;  // restore limit settings



---In dynomotion@yahoogroups.com, <tk@...> wrote:

I see one possible issue.  The Y homing code sets the destination to:

   EnableAxisDest(1,-95611.2);

Which is exactly the range of the Soft Limits 

    ch1->SoftLimitPos=95611.2;
    ch1->SoftLimitNeg=-95611.2;

This may trigger a Soft Limit error.

Actually it is not really possible to use Soft Limits until after the machine has been homed.  So you may want to leave them disabled (infinity) and then set them to normal values at the end of the Home Program.

Your initialization code currently sets the current destination to zero.  You might want to have it leave the current destination unchanged by changing:

EnableAxisDest(0,0);

to

EnableAxisDest(0,ch0->Dest);

I assume this code is for diagnostics:

        if (ReadBit(180) == 0)
        {
            printf("Bit State Pressed");
        }


But if Bit 180 becomes true it will print a huge number of message to the Console.

I don't understand or see an explanation for the other issues. 

Regards
TK

Group: DynoMotion Message: 8597 From: sahil_atlury Date: 11/10/2013
Subject: Re: Reg: Homing - Y-Axis doesnt "Home" properly, stops inb

Dear Tom,


The problem "However in both the same Y-axis never homed properly. However like you said we will try out setting soft limits to infinite at initialization, and after homing set it to desired value and report back." still persisted even after making the said changes.


Formatted and Installed Windows XP SP3 32-bit and ran the same code. Strangely everything works as it is supposed. Y-axis now works.


Which somehow did not work in Windows 7 32-bit. Wonder what could have made any difference? Operating System is being the culprit?

Thanks
Sahil


---In dynomotion@yahoogroups.com, <tk@...> wrote:

Hi,

As I mentioned the code you sent with the loop could send infinite messages to the KMotion Console which would likely clog the USB bandwidth and make KMotionCNC unresponsive.  You might change the code to only display one message (use a flag).  Or put a delay (1sec) after printing to limit the number of messages.

Regards
TK

Group: DynoMotion Message: 8601 From: TK Date: 11/10/2013
Subject: Re: Reg: Homing - Y-Axis doesnt "Home" properly, stops inb
Hi Sahil,

The OS shouldn't matter. 

Regards
TK

On Nov 10, 2013, at 12:01 AM, <sahil_atlury@...> wrote:

 

Dear Tom,


The problem "However in both the same Y-axis never homed properly. However like you said we will try out setting soft limits to infinite at initialization, and after homing set it to desired value and report back." still persisted even after making the said changes.


Formatted and Installed Windows XP SP3 32-bit and ran the same code. Strangely everything works as it is supposed. Y-axis now works.


Which somehow did not work in Windows 7 32-bit. Wonder what could have made any difference? Operating System is being the culprit?

Thanks
Sahil


---In dynomotion@yahoogroups.com, <tk@...> wrote:

Hi,

As I mentioned the code you sent with the loop could send infinite messages to the KMotion Console which would likely clog the USB bandwidth and make KMotionCNC unresponsive.  You might change the code to only display one message (use a flag).  Or put a delay (1sec) after printing to limit the number of messages.

Regards
TK